package cn.njxzc.book.masterexamples.ch14;

import java.util.*;
public class SetDemo1 {
    public static void main(String [] args) {
        Set s = new HashSet();
        for (int i=0; i<args.length; i++)
            if (!s.add(args[i]))
                System.out.println("第"+i+"个元素"+"Duplicate: "+args[i]);
        System.out.println(s.size()+" distinct words: "+s);
    }
}
